package com.alexeyhanin.tapestry.goodies.testapp.select.pages;

import com.alexeyhanin.tapestry.goodies.testapp.select.Dummy;
import com.alexeyhanin.tapestry.goodies.util.select.InjectSelectModel;
import org.apache.tapestry5.annotations.Property;

import java.util.ArrayList;
import java.util.List;

/**
 * @author aha
 * @since 2009.30.11
 *        $Id$
 */
public class InjectSelectModelPage {

    @InjectSelectModel(id = "id", labelFormat = "({code}) {name}")
    private List<Dummy> testDummies;

    @Property
    private Dummy dummy;

    void setupRender() {
        testDummies = new ArrayList<Dummy>();
        testDummies.add(new Dummy("1", "EC", "iEco"));
        testDummies.add(new Dummy("2", "TP", "Prius"));
    }

}
